package com.brainhealth.customer.domain;

import com.brainhealth.common.enums.LearnCatetoryType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.brainhealth.common.annotation.Excel;
import com.brainhealth.common.core.domain.BaseEntity;

import javax.validation.constraints.Max;
import java.util.ArrayList;
import java.util.List;

/**
 * 学习库分类树对象 learn_category
 * 
 * @author wolong
 * @date 2023-04-23
 */
public class LearnCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    public LearnCategory()
    {
        children = new ArrayList<>();
    }

    /** 学习库分类主键 */
    private Long learnCategoryId;

    /** 学习库分类名称 */
    @Excel(name = "学习库名称")
    private String name;

    private String categoryName;
    /**
     * 学习库分类类型
     */
    private LearnCatetoryType categoryType;

    /** 学习库分类图片地址 */
    @Excel(name = "学习库图片地址")
    private String pictureUrl;

    /** 学习库分类描述 */
    @Excel(name = "学习库描述")
    private String description;

    /** 学习库分类父id */
    @Excel(name = "学习库分类父id")
    private Long parentId;

    private String parentName;

    /**
     * 学习分类子节点
     */
    private List<LearnCategory> children;

    public LearnCatetoryType getCategoryType()
    {
        return categoryType;
    }

    public void setCategoryType(LearnCatetoryType categoryType)
    {
        this.categoryType = categoryType;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public List<LearnCategory> getChildren()
    {
        return children;
    }

    public void setChildren(List<LearnCategory> children)
    {
        this.children = children;
    }

    public String getParentName()
    {
        return parentName;
    }

    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }

    public void setLearnCategoryId(Long learnCategoryId)
    {
        this.learnCategoryId = learnCategoryId;
    }

    public Long getLearnCategoryId() 
    {
        return learnCategoryId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setPictureUrl(String pictureUrl) 
    {
        this.pictureUrl = pictureUrl;
    }

    public String getPictureUrl() 
    {
        return pictureUrl;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("learnCategoryId", getLearnCategoryId())
            .append("name", getName())
            .append("pictureUrl", getPictureUrl())
            .append("description", getDescription())
            .append("parentId", getParentId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
